package com.zbkj.service.dividend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zbkj.common.request.PageParamRequest;
import com.zbkj.service.dividend.model.DividendPoolRecord;
import com.zbkj.service.dividend.request.DividendPoolRecordRequest;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户分红记录服务接口
 * +----------------------------------------------------------------------
 * | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
 * +----------------------------------------------------------------------
 * | Author: CRMEB Team <admin@crmeb.com>
 * +----------------------------------------------------------------------
 */
public interface DividendPoolRecordService extends IService<DividendPoolRecord> {

    /**
     * 分页查询分红记录
     */
    List<DividendPoolRecord> getList(DividendPoolRecordRequest request, PageParamRequest pageParamRequest);
    /**
     * 根据用户ID查询分红记录
     */
    List<DividendPoolRecord> getByUserId(Integer userId);

    /**
     * 根据订单ID查询分红记录
     */
    DividendPoolRecord getByOrderNo(Integer orderNo);

    /**
     * 统计用户分红总额
     */
    BigDecimal getTotalDividendByUserId(Integer userId);

    /**
     * 创建分红记录
     */
    int createDividendRecord(DividendPoolRecord record);

    /**
     * 批量创建分红记录
     */
    int batchCreateDividendRecords(List<DividendPoolRecord> records);

    /**
     * 获取分红统计信息
     */
    List<DividendPoolRecord> getDividendStats(String startDate, String endDate);
}